home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ LANGUAGE="javascript" %> <% Response.Expires = 0 %> <HTML> <HEAD> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <TITLE> Windows Media Presenter </TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0> <SCRIPT Langauge="JavaScript"> <!-- // Init values for browser detect. bName = navigator.appName; bVer = parseInt(navigator.appVersion); if (bName == "Netscape" && bVer >= 4) br = "n4"; else if (bName == "Netscape" && bVer == 3) br = "n3"; else if (bName == "Microsoft Internet Explorer" && bVer >= 4) br = "e4"; else if (bName == "Microsoft Internet Explorer") br = "e3"; else br = "n2"; // --> </SCRIPT> <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%" BGCOLOR="#000000"> <TR><TD ALIGN=LEFT VALIGN=TOP><IMG SRC="images/tbleft.gif" BORDER=0 WIDTH=291 HEIGHT=19 ALT="-"></TD></TR> </TABLE> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> <TR><TD ALIGN=LEFT VALIGN=TOP><IMG SRC="images/logo.gif" BORDER=0 ALT="Windows Media Presenter" WIDTH=270 HEIGHT=43></TD><TD ALIGN=RIGHT VALIGN=TOP><IMG SRC="images/topright.gif" BORDER=0 ALT="-" WIDTH=608 HEIGHT=57></TD></TR> </TABLE> <BR> <BLOCKQUOTE> <TABLE BORDER="0"> <TR> <TD> <FONT FACE="verdana, arial, helvetica" SIZE="2"> Today's Event: </FONT> </TD> <TD> <FONT FACE="verdana, arial, helvetica" SIZE="2"> <B><% = Application("EVENT_TITLE") %></B> </FONT> </TD> </TR> <TR> <TD> <FONT FACE="verdana, arial, helvetica" SIZE="2"> Start Time: </FONT> </TD> <TD> <FONT FACE="verdana, arial, helvetica" SIZE="2"> <B> <SCRIPT LANGUAGE="JavaScript"> <!-- // This script takes the UTC SHOW_TIME value and writes it to the screen in the users local time. It supports all time zones. // Init display Date var showDisplayDate = new Date("<%= Application("SHOW_TIME") %>"); // Find Time Zone Offset and adjust var offsetDate = new Date(0); var offset = (offsetDate.getTimezoneOffset() / 60); showDisplayDate.setHours(showDisplayDate.getHours() - offset); // Break down date values for display var year = showDisplayDate.getYear(); var month = showDisplayDate.getMonth(); var day = showDisplayDate.getDate(); var hours = showDisplayDate.getHours(); var minutes = showDisplayDate.getMinutes(); var zerobuffer = ""; var ntbuffer = "19"; var nandd = "temp"; // sets the zero buffer if (minutes <= "9") { zerobuffer = "0" } // sets the ntbuffer var yearstring = year.toString(); var ntbuffertemp = yearstring.indexOf("20", 0); if (ntbuffertemp != "-1") { ntbuffer = "" } //sets am or pm if (hours <= 11) { nandd = "am" } else if (hours >= 12) { nandd = "pm" } // gets rid of military time if (hours > 12) { hours = (hours - 12) } // Writes final values to screen var monthname; if (month == 0) monthname = "January"; if (month == 1) monthname = "February"; if (month == 2) monthname = "March"; if (month == 3) monthname = "April"; if (month == 4) monthname = "May"; if (month == 5) monthname = "June"; if (month == 6) monthname = "July"; if (month == 7) monthname = "August"; if (month == 8) monthname = "September"; if (month == 9) monthname = "October"; if (month == 10) monthname = "November"; if (month == 11) monthname = "December"; document.write(hours + ":" + zerobuffer + minutes + " " + nandd + " on " + monthname + " " + day + ", " + ntbuffer + year + "</font><BR>") // --> </SCRIPT> </B> </FONT> </TD> </TR> </TABLE> </BLOCKQUOTE> <HR WIDTH="85%"> <BLOCKQUOTE> <FONT FACE="verdana, arial, helvetica" SIZE="2"> <SCRIPT Language="JavaScript"> <!-- // Check Global Event Variables for common errors // Check for invalid Dates var sdate = new Date("<%= Application("SHOW_TIME") %>"); var edate = new Date("<%= Application("SHOW_END_TIME") %>"); var errorDetect0 var errorDetect1 var invalidDate var conflictDate var invalidMult var errorNum = 0 if ((sdate == "NaN") || (sdate == "Invalid Date") || (edate == "NaN") || (edate == "Invalid Date") || ("<%= Application("SHOW_TIME") %>" == "<%= Application("SHOW_END_TIME") %>")) { errorDetect0 = "True" invalidDate = "True" } // Check for conflicting Begin and End Times var startMilli = Date.parse(sdate); var endMilli = Date.parse(edate); if (startMilli > endMilli) { errorDetect1 = "True" conflictDate = "True" } if (errorDetect0 == "True") { errorNum++ } if (errorDetect1 == "True") { errorNum++ } // --> </SCRIPT> <SCRIPT language="javascript"> <!-- // Write Out Any Error Messages if(errorNum >= 1) { if (errorNum >=2) { document.write("Errors have been detected in the current configuration of Presenter. The following errors need to be repaired before Presenter will work correctly:"); } else { document.write("An error has been detected in the current configuration of Presenter. The following error needs to be repaired before Presenter will work correctly:"); } document.write('<UL>'); if (errorDetect0 == "True") { document.write('<LI>The SHOW_TIME or SHOW_END_TIME for this event are not valid dates.'); } if (errorDetect1 == "True") { document.write('<LI>The SHOW_TIME and SHOW_END_TIME dates conflict.'); } document.write('</UL>'); var adminName = "<%= Application("ADMIN_NAME") %>" var adminEmail = "<%= Application("ADMIN_EMAIL") %>" if (adminName == "" && adminEmail == "") { document.write('Please contact your event administrator for more information.') } else if (adminName != "" && adminEmail != "") { document.write('Please contact <A href="mailto:' + adminEmail + '">' + adminName + '</A> for information on how to adjust these settings.') } else if (adminEmail != "" && adminName == "") { document.write('Please contact <A href="mailto:' + adminEmail + '">the event administrator</A> for information on how to adjust these settings.') } else if (adminEmail == "" && adminName != "") { document.write('Please contact ' + adminName + ' for information on how to adjust these settings.') } } // End Write Out Any Error Messages // --> </SCRIPT> </FONT> </BLOCKQUOTE> <SCRIPT Langauge="JavaScript"> <!-- // Write out the appropriate messages on the screen depending on which browser the client is using and if Windows Media Player is installed. if ((br == "e4") && (errorNum == 0)) { document.write('<BLOCKQUOTE><FONT FACE="verdana, arial, helvetica" SIZE="2">As you wait for the presentation to start, Windows Media Player is automatically loading the required software components and presentation slides.<BR></FONT></BLOCKQUOTE>'); document.write('<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><IMG SRC="images/bfiller.gif" BORDER=0 WIDTH=266 HEIGHT=173 ALT="Graphic"> </TD><TD><OBJECT ID="lblClock" WIDTH=400 HEIGHT=50 CLASSID="CLSID:40F07A91-8E6F-11D0-8A0A-00A0C90C9B67" CODEBASE="<% = Application("MCSIControls") %>"><PARAM NAME="ForeColor" VALUE="0"><PARAM NAME="BackColor" VALUE="2385975"><PARAM NAME="Alignment" VALUE="3"><PARAM NAME="Appearance" VALUE="0"><PARAM NAME="BackStyle" VALUE="0"><PARAM NAME="Text" VALUE=""><PARAM NAME="Angle" VALUE="0"><PARAM NAME="BorderStyle" VALUE="2"><PARAM NAME="FontName" VALUE="Arial"><PARAM NAME="FontSize" VALUE="14"><PARAM NAME="FontBold" VALUE="0"><PARAM NAME="FontItalic" VALUE="0"><PARAM NAME="FontUnderline" VALUE="0"><PARAM NAME="FontStrikethrough" VALUE="0"><PARAM NAME="FontCharset" VALUE="0"></OBJECT></TD></TR></TABLE>'); } else if ((br == "n4") && (errorNum == 0)) { if (navigator.mimeTypes["application/asx"]) { document.write('<BLOCKQUOTE>The Windows Media Player is already installed on this machine.<BR> Thank you for using the Windows Media Player. Enjoy the Presentation.') } else { document.write('<BLOCKQUOTE>You currently do not have not the Windows Media Player installed. Please follow these steps:<BR><OL><LI>Download <A HREF="<%= Application("NS_PLAY") %>">nsfull.exe</A>.<LI>Exit from Netscape Navigator.<LI>Double click on nsplay.exe to install the Windows Media Player.<LI>You may be asked to restart your computer.<LI>Restart Netscape Navigator and return to this page.</OL>') } document.write('</BLOCKQUOTE><table border="0"><TR><TD><IMG SRC="images/bfiller.gif" BORDER=0 WIDTH=266 HEIGHT=173 ALT="Graphic"></TD><TD>'); document.write('<APPLET CODE="Clbl.class" NAME="ColorLabel" ALIGN="MIDDLE" HEIGHT="30" WIDTH="400" HSPACE="0" VSPACE="0">'); document.write('<param name=Caption value="">'); document.write('<param name=Foreground value="0">'); document.write('<param name=Background value="16777215">'); document.write('<param name=FontStyle value=1>'); document.write('<param name=FontSize value=16>'); document.write('<param name=XCoord value=10>'); document.write('<param name=YCoord value=20>'); document.write('</applet>'); document.write('</TD></TR></TABLE>'); } // --> </SCRIPT> <SCRIPT Language="JavaScript"> <!-- var startTimeTimerTemp = new Date("<%= Application("SHOW_TIME") %>"); var startMilliTemp = Date.parse(startTimeTimerTemp); var theCurrentTimeTemp = new Date(); var currentMilliTemp = Date.parse(theCurrentTimeTemp); if (currentMilliTemp <= startMilliTemp) { document.write('<OBJECT ID="LoadNSPlayer" BORDER=0 WIDTH=0 HEIGHT=0 CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" CODEBASE="<%= Application("NS_CORE") %>"></OBJECT>'); document.write('<OBJECT ID="TimerCtl1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:1A12C811-9001-11D0-8A0B-00A0C90C9B67" CODEBASE="<% = Application("MCSIControls") %>"></OBJECT>'); } // --> </script> <SCRIPT Langauge="JavaScript"> <!-- function errortrap(){ return true; } // --> </SCRIPT> <SCRIPT Langauge="JavaScript"> <!-- function TimeToShow() { // The current time, show time, and end time var theCurrentTime = new Date(); var showTimeTimer = new Date("<%= Application("SHOW_TIME") %>"); var endTimeTimer = new Date("<%= Application("SHOW_END_TIME") %>"); // offset times showTimeTimer.setHours(showTimeTimer.getHours() - offset); endTimeTimer.setHours(endTimeTimer.getHours() - offset); // The current time, show time, and end time in milliseconds var currentMilli = Date.parse(theCurrentTime); var startMilli = Date.parse("<%= Application("SHOW_TIME") %>"); var endMilli = Date.parse("<%= Application("SHOW_END_TIME") %>"); // Time left before presentation var timeLeft = (showTimeTimer.getTime() - theCurrentTime.getTime()); var timer_killtimer = false // General Time Checking if (timeLeft <= 0) // The show has started or has ended { if (theCurrentTime.getTime() > endTimeTimer.getTime()) { str = "The presentation has ended."; window.status = "The presentation has ended." timer_killtimer = true; } if (theCurrentTime.getTime() < endTimeTimer.getTime()) { str = "The presentation is in session."; top.location.href = "first/default.asp"; timer_killtimer = true; } } else //continue counting down the timer { varSecondMilli = 1000; varMinuteMilli = varSecondMilli * 60; varHourMilli = varMinuteMilli * 60; varDayMilli = varHourMilli * 24; varDays = Math.floor(timeLeft / varDayMilli); timeLeft -= varDays * varDayMilli; varHours = Math.floor(timeLeft / varHourMilli); timeLeft -= varHours * varHourMilli; varMins = Math.floor(timeLeft / varMinuteMilli); timeLeft -= varMins * varMinuteMilli; varSecs = Math.floor(timeLeft / varSecondMilli); str = "Presentation will begin in " + (varDays > 0 ? ("" + varDays + " days, ") : "") + (varHours < 10 ? "0" : "") + varHours + (varMins < 10 ? ":0" : ":") + varMins + (varSecs < 10 ? ":0" : ":") + varSecs; } // Rewrite timer label if ((br == "e4") || (br == "e3")) { lblClock.Text = str; } else if ((br == "n3") || (br == "n4")) { document.ColorLabel.setCaption(str); } // check if the timer needs killed if (timer_killtimer == false) { timer_timerID = setTimeout('TimeToShow()',1000); } return true; } // --> </SCRIPT> <SCRIPT Langauge="JavaScript"> <!-- if (errorNum == 0) { TimeToShow(); } // --> </SCRIPT> <SCRIPT Langauge="JavaScript"> <!-- var multtemp = "<%= Application("MULTICAST") %>"; multtemp = multtemp.toLowerCase(); if (multtemp == "true") { document.write('<OBJECT ID="LoadFTS" BORDER=0 WIDTH=0 HEIGHT=0 CLASSID="CLSID:26F24A93-1DA2-11D0-A334-00AA004A5FC5" CODEBASE="<%= Application("NS_FILE") %>"></OBJECT>'); } // --> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Dim bSlidesDownloaded bSlidesDownloaded = False Dim iNumSlidesDownloaded iNumSlidesDownloaded = 0 Sub CheckControls On Error Resume Next If LoadNSPlayer is Nothing Then MsgBox "Error: Unable to load the Windows Media Player control. " + _ " ", 0, "Windows Media Player Error" PLAYER_LOADED = False Else PLAYER_LOADED = True End If If LoadFTS is Nothing Then MsgBox "Error: Unable to load the Windows Media File Transfer control." + _ " ", 0, "Windows Media File Transfer Control Error" FTS_LOADED = False Else FTS_LOADED = True End If ' Wait until all objects are loaded. If (FTS_LOADED = True) Then LoadSlides() End If End Sub Sub LoadSlides() On Error Resume Next Call LoadFTS.FtsRegisterStatusCallback(0, 0, 4096, 1, 0, 0, 0, 0, 0, 4+8+16+32+64, 0) If LoadFTS.FtsStartFileTransferReceive("<%= Application("VS_FTS_IP") %>", "<%= Application("VS_FTS_PORT") %>", "", "", 0, 17409) Then MsgBox "Start Error = " & ReturnError(StartError) Else window.status = "Waiting for file transfer..." End If End Sub Sub LoadFTS_FtsOnTransferStarted window.status = "Starting transfer..." End Sub Sub LoadFTS_FtsOnFileTransferStarted window.status = "Receiving slide from " & LoadFTS.CurrentFilePath End Sub Sub LoadFTS_FtsOnFileTransferCompleted window.status = "Transfer complete." End Sub Sub LoadFTS_FtsOnTransferCompleted If bSlidesDownloaded = True Then iNumSlidesDownloaded = LoadFTS.NumFilesTransferred Call KillDownloadSession Else bSlidesDownloaded = True End If End Sub Sub LoadFTS_FtsOnStatusChanged Cancelled = (LoadFTS.TransferStatus = 5) and (LoadFTS.Result = -2147467260) If Cancelled Then window.status = "Slide Transfer Completed." & iNumSlidesDownloaded & " Slides Transfered." End If End Sub Sub KillDownloadSession TimerCtl1.Interval=500 TimerCtl1.Start End Sub Sub TimerCtl1_Timer Call KillTimer End Sub Sub KillTimer TimerCtl1.Stop End Sub Sub KillFts On Error Resume Next Call LoadFTS.FtsCancelFileTransferReceive Call LoadFTS.FtsRevokeStatusCallback(0, 0, 4096, 1, 0, 0, 0, 0, 0, 4+8+16+32+64) End Sub Sub Window_onunLoad() On Error Resume Next Call LoadFTS.FtsCancelFileTransferReceive Call LoadFTS.FtsRevokeStatusCallback(0, 0, 4096, 1, 0, 0, 0, 0, 0, 4+8+16+32+64) End Sub </SCRIPT> <SCRIPT Langauge="JavaScript"> <!-- if ((errorNum == 0) && (currentMilliTemp <= startMilliTemp)) { CheckControls(); } // --> </SCRIPT> </BODY> </HTML>